<?php
namespace app\index\controller;

use app\common\logic\CaptchaLogic;
use app\common\respond\HttpApi;

/**
 * 图片验证码控制类
 */
class PictureCodeController
{
    /**
     * @Description 创建验证码
     * @author: zj
     * @param HttpApi $respond
     * @time 2024/03/18 17:46:43
     * @return \think\response\Json
     */
    public function createCode(HttpApi $respond)
    {
        $logic = new CaptchaLogic();         
        $content = $logic->create('verify');

        return $respond->success([
            'captcha' => $content
        ]);
    }

}
